package com.logos.ruralrevitalization.req.chat;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.ai.tool.annotation.ToolParam;

import java.util.Date;
import java.util.List;

/**
 * 农产品表(AgriculturalProduct)实体类
 *
 * @author rose
 * @since 2025-03-25 12:27:49
 */
@Data
public class AgriculturalProductQuery  {

    @ToolParam(required = false, description = "农产品的id")
    private Long id;

    @ToolParam(required = false, description = "农产品名称")
    private String name;

    @ToolParam(required = false, description = "农产品描述")
    private String description;

    @ToolParam(required = false, description = "农产品的图片")
    private String avatar;

    @ToolParam(required = false, description = "农产品类型,1果蔬，2畜产，3水产")
    private Integer productType;

    @ToolParam(required = false, description = "农产品价格")
    private Double price;

    @ToolParam(required = false, description = "生产日期")
    private Date productionDate;

    @ToolParam(required = false, description = "过期日期")
    private Date expirationDate;

    @ToolParam(required = false, description = "供应商id")
    private Long supplierId;

    @ToolParam(required = false, description = "排序方式")
    private List<Sort> sorts;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Sort {
        @ToolParam(required = false, description = "排序字段: price或sales_volume")
        private String field;
        @ToolParam(required = false, description = "是否是升序: true/false")
        private Boolean asc;
    }
}

